package org.example.feign;

import org.example.feign.error.MessageError;
import org.example.pojo.AuthInfo;
import org.example.pojo.Respond;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.context.annotation.Lazy;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;

@FeignClient(name = "registerFeign",url = "${auth.centre.url}",fallback = MessageError.class)
@Component
@Lazy
public interface RegisterFeign {
    @PostMapping("/register")
    Respond<String> register(@RequestParam("router")String router, @RequestBody() AuthInfo authInfo);

}
